﻿using System.Collections.Generic;
using GameFramework.Battle.Core;
using Gameplay.PVE.Utils;
using Unity.Collections;
using Unity.Mathematics;
using UnityEngine;

namespace Yoozoo.Gameplay.RTS
{
    public struct AnimSpriteData
    {
        //数据全部从AnimSpriteCreatorData赋值
        //为何要新建这个结构体？因为变量需要[NativeDisableParallelForRestriction]标记

        public int count;
        public float createScale;
        
        /// <summary>
        /// 粒子透明度
        /// </summary>
        [NativeDisableParallelForRestriction]
        public NativeArray<byte> alphas;

        /// <summary>
        /// 动画从头开始播放
        /// </summary>
        [NativeDisableParallelForRestriction]
        public NativeArray<bool> restarts;

        /// <summary>
        /// 当前的动作编号
        /// </summary>
        [NativeDisableParallelForRestriction]
        public NativeArray<int> actions;

        [NativeDisableParallelForRestriction]
        public NativeArray<float3> rotations;

        /// <summary>
        /// 动画播放速度
        /// </summary>
        [NativeDisableParallelForRestriction]
        public NativeArray<float> speeds;

        [NativeDisableParallelForRestriction]
        public NativeArray<float3> positions;

        [NativeDisableParallelForRestriction]
        public NativeArray<float3> offsets;

        [NativeDisableParallelForRestriction]
        public NativeArray<float> spriteSizes;

        [NativeDisableParallelForRestriction]
        public NativeArray<bool> removes;

        [NativeDisableParallelForRestriction]
        public NativeArray<int> childIndex;
        
        [NativeDisableParallelForRestriction]
        public NativeArray<bool> valid;

        [NativeDisableParallelForRestriction]
        public NativeArray<bool> isShadow;
        
        [NativeDisableParallelForRestriction]
        public NativeArray<int> team;
    }
}
